package cz.czu.pef.DataModelling.utils;

public class Constants
{
  /**
   * IMPORTANT: PROJECT CONSTANTS
   */
  public static final String springProductionClasspathConfig = "classpath*:/app-prod-*-config.xml";
  public static final String springTestingClasspathConfig = "classpath*:/app-test-*-config.xml";

  /**
   * UNIMPORTANT: TESTING VALUES (Czech language)
   */
  public static final String ROLETYPE_CODE_IT_ARCHITECT = "IT_ARCH";
  public static final String ROLETYPE_CODE_IT_PROGRAMMER = "IT_PROG";
  public static final String ROLETYPE_CODE_IT_CONSULTANT = "IT_CONS";
  public static final String ROLETYPE_CODE_IT_ADMINISTRATOR = "IT_ADMINS";

  public static final String ROLETYPE_CODE_RIDIC_PROFI = "RIDIC_PROFI";
  public static final String ROLETYPE_CODE_ZAHR_MISTR = "ZAHR_MISTR";
  public static final String ROLETYPE_CODE_ZAHRADNIK = "ZAHRADNIK";
  public static final String ROLETYPE_CODE_DELNIK = "DELNIK";
  public static final String ROLETYPE_CODE_THP = "THP";
  
  public static final String MEDICAL_EXAMINATION_TYPE_PRAKTIK = "PRAKTIK";
  public static final String MEDICAL_EXAMINATION_TYPE_OCNI = "OCNI";
  public static final String MEDICAL_EXAMINATION_TYPE_NEURO = "NEURO";
  public static final String MEDICAL_EXAMINATION_TYPE_PSYCHO = "PSYCHO";

  public static final String TRAINING_TYPE_BOZP = "BOZP";
  public static final String TRAINING_TYPE_PO = "PO";

  /**
   * UNIMPORTANT: TESTING QUERIES
   */

	public static final String missingTrainingsHqlSelect =
    "select emp, rr, reqTT from EmployeeEntityImpl as emp " +
    " join emp.roles as rr join rr.roleType.traningTypesForRoleTypes as ttfrt " +
    " join ttfrt.trainingType as reqTT " +
    " where reqTT.code not in (select haveTT.code from EmployeeEntityImpl as emp2 " +
    "                          join emp2.person.trainings as tt2 " +
    "                          join tt2.trainingType haveTT " +
    "                          where emp2 = emp " +
    "                            and (tt2.evidencePassExpiration is null or tt2.evidencePassExpiration > current_date())) " +
    " order by emp.person.lastName, rr.roleType.code, reqTT.code";


	public static final String missingMedicalExaminationsHqlSelect =
    "select emp, rr, reqTT from EmployeeEntityImpl as emp " +
    " join emp.roles as rr join rr.roleType.medExamTypesForRoleTypes as ttfrt " +
    " join ttfrt.medicalExaminationType as reqTT " +
    " where reqTT.code not in (select haveTT.code from EmployeeEntityImpl as emp2 " +
    "                          join emp2.person.medicalExaminations as tt2 " +
    "                          join tt2.medicalExaminationType haveTT " +
    "                          where emp2 = emp) " +
    " order by emp.person.lastName, rr.roleType.code, reqTT.code";

    public static final String selectEmployeeWithNoTraining = 
        "select emp from EmployeeEntityImpl as emp left join emp.person.trainings as t where t is null";

	// TODO
	public static final String selectAllMachineryWorkers = "";
}
